package com.example.miaoshademo;

import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Date;

/**
 * @author Shenluw
 * created：2019/7/17 21:28
 */
@Entity
public class MiaoshaData {

	@Id
	private Integer id;
	private Integer goodsId;
	private Integer stock;
	// 当前已经被消耗的库存
	private Integer consumeStock;
	private Date    startTime;
	private Date    createTime;

	public Integer getId() {
		return id;
	}

	public MiaoshaData setId(Integer id) {
		this.id = id;
		return this;
	}

	public Integer getGoodsId() {
		return goodsId;
	}

	public MiaoshaData setGoodsId(Integer goodsId) {
		this.goodsId = goodsId;
		return this;
	}

	public Integer getStock() {
		return stock;
	}

	public MiaoshaData setStock(Integer stock) {
		this.stock = stock;
		return this;
	}

	public Date getStartTime() {
		return startTime;
	}

	public MiaoshaData setStartTime(Date startTime) {
		this.startTime = startTime;
		return this;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public MiaoshaData setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}

	public Integer getConsumeStock() {
		return consumeStock;
	}

	public MiaoshaData setConsumeStock(Integer consumeStock) {
		this.consumeStock = consumeStock;
		return this;
	}

	@Override
	public String toString() {
		return "MiaoshaData{" +
				"id=" + id +
				", goodsId=" + goodsId +
				", stock=" + stock +
				", consumeStock=" + consumeStock +
				", startTime=" + startTime +
				", createTime=" + createTime +
				'}';
	}
}
